{% extends "base.html" %}

{% block title %}Blog - {{ object.title|escape }}{% endblock %}
{% block sidebar %}
<a href="/polls/"> 返回 </a>
{% endblock %}
{% block content %}


<h2>{{ object.question }}</h2>

{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

<form action="/polls/{{ object.id }}/vote/" method="post">
{% for choice in object.choice_set.all %}
    <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
    <label for="choice{{ forloop.counter }}">{{ choice.choice }}</label><br />
{% endfor %}

<input type="submit" value="投一票" />
</form>



{% endblock %}
